package cn.powertime.evaluation.service.impl;

import cn.powertime.evaluation.entity.DbqQuestion;
import cn.powertime.evaluation.entity.SysRes;
import cn.powertime.evaluation.mapper.DbqQuestionMapper;
import cn.powertime.evaluation.service.DbqQuestionService;
import cn.powertime.evaluation.vo.CpsSearchVo;
import cn.powertime.evaluation.vo.DbqQuestionVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 问题表 服务实现类
 * </p>
 *
 * @author liqi
 * @since 2019-09-23
 */
@Service
public class DbqQuestionServiceImpl extends ServiceImpl<DbqQuestionMapper, DbqQuestion> implements DbqQuestionService {

    @Autowired
    private  DbqQuestionMapper questionMapper;

    @Override
    public List<DbqQuestionVo> questionQuery(Long id) {
        return questionMapper.questionList(id);
    }

    @Override
    public List<DbqQuestionVo> questionUserQuery(Long uid) {
        return questionMapper.questionUserList(uid);
    }

    @Override
    public boolean ownUpdateById(DbqQuestion menu) {
        return updateById(menu);
    }

    @Override
    public boolean ownSave(DbqQuestion menu) {
        return save(menu);
    }

    @Override
    public List<DbqQuestionVo> questionDetailsList(Long uid) {
        return questionMapper.questionDetailsList(uid);
    }

    @Override
    public List<DbqQuestionVo> questionSearchList(CpsSearchVo cpsSearchVo) {
        return questionMapper.questionSearchList(cpsSearchVo);
    }
}
